生成一个dialog，用来设置任务截止时间的时分秒，使用input来输入，默认为0，并校验时间的数字范围
<template>
  <div>
    <el-dialog title="设置任务时效" :visible.sync="open" width="600px" @close="close" append-to-body>
      <el-form ref="form" :model="form" label-width="100px">
        <el-form-item label="任务截止时间" prop="deadline">
          <el-row class="time-inputer">
            <el-col :span="6">
              <el-input v-model="form.day" type="number" :min="0" size="mini"></el-input><span>天</span>
            </el-col>
            <el-col :span="6">
              <el-input v-model="form.hour" size="mini" type="number" :min="0" :max="24"></el-input><span>小时</span>
            </el-col>
            <el-col :span="6">
              <el-input v-model="form.minute" size="mini" type="number" :min="0" :max="60"></el-input><span>分钟</span>
            </el-col>
            <el-col :span="6">
              <el-input v-model="form.second" size="mini" type="number" :min="0" :max="60"></el-input><span>秒</span>
            </el-col>
          </el-row>
        </el-form-item>
      </el-form>
      <div slot="footer">
        <el-button @click="close">取消</el-button>
        <el-button type="primary" @click="handleConfirm">确定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import dialogMixin from '@/mixins/dialogMixin';
export default {
  name: "TaskDDLSet",
  mixins: [dialogMixin],
  props: {
    taskId: {
      type: String,
      default: "0"
    },
  },
  data() {
    return {
      form: {
        day: 0,
        hour: 0,
        minute: 0,
        second: 0
      },
    }
  },
  methods: {
    updateDDL(ddl) {
      this.form = {
        day: ddl.days,
        hour: ddl.hours,
        minute: ddl.minutes,
        second: ddl.secondsFinal
      };
      this.show();
    },
    handleConfirm() {
      let deadline = Math.ceil(this.form.day) * 24 * 60 * 60 + Math.ceil(this.form.hour) * 60 * 60 + Math.ceil(this.form.minute) * 60 + Math.ceil(this.form.second);
      this.$emit("handleOk", deadline);
      this.close();
    }
  }
}
</script>
<style lang="scss" scoped>
.time-inputer {
  .el-col {
    display: flex;
    justify-content: center;

    .el-input {
      width: 70px;
    }

    span {
      text-wrap: nowrap;
      margin-left: 5px;

    }
  }
}
</style>